#ifndef __COVERT_H__
#define __COVERT_H__

#include <string.h>
#include "typedef.h"

uchr8_t char_to_hex(chr8_t c);
chr8_t hex_to_char(uchr8_t h);
int32_t str_to_hex(chr8_t *str);
int32_t str_to_digit(chr8_t *str);
int32_t dec2bcd(int32_t dec, uchr8_t *buf, usht16_t buflen);
int32_t bcd2dec(uchr8_t *bcd, usht16_t bcdlen);
int32_t dec2ascii(int32_t dec, uchr8_t *buf, usht16_t buflen);
usrbool str_isfloat(chr8_t *str);
usrbool str_ishex(chr8_t *str);
uint32_t calc_10nth(uint32_t n);

#endif /* __COVERT_H__ */